<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>过渡</title>
    <style>
        .box{
            width: 200px;
            height: 200px;
            background-color: rgb(255, 159, 159);
            outline: 1px solid black;
            /* transition: width 0.3s; */
            /* 指定要过渡的css属性 */
            /* transition-property: width height background-color; */
            /* transition-property:all; */
            /* 指定要过渡的时间 */
            /* transition-duration: 2s; */
            /* 过渡线性规律 */
            /* transition-timing-function: cubic-bezier(0, 1.04, 0.59, 1.57); */
            /* transition:all 2s cubic-bezier(0, 1.04, 0.59, 1.57); */
            transition: 0.5s;
        }
        .b1:hover{
            width: 300px;
            height: 300px;
            background-color: rgb(47, 4, 165);
        }
        .b2:hover{
            /* 下面两种都不能过渡，应为属性值不是数值 */
            /* display: none; */
            /* visibility: hidden; */
            opacity: 0.5;
        }
        .b3{
            position: relative;
            transition: 0.5s;
            /* 如果没有left:0,hover后left:50就不会过渡 */
            left:0;
            
        }
        .b3:hover{
            left: 50px;
            /* 一般情况我们把transition加在元素上而不是hover上，因为加在hover上当鼠标一离开就不会有过渡 */
            /* transition: 0.5s; */
        }
        .b4:hover{
            border-radius: 50%;
        }
    </style>
</head>
<body>
    <div class="box b1">
        b1
    </div>
    <div class="box b2">
        b2
    </div>
    <div class="box b3">
        b3
    </div>
    <div class="box b4">
        b4
    </div>

</body>
</html>